﻿using AiXiu.BLL;
using AiXiu.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace AiXiu.WebStite
{
    public partial class Discuss : System.Web.UI.Page
    {
        protected string VideoId;
        protected string NickName;
        protected string Avatar;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //判断是否有视频Id 有：就播放 无：就跳转到Default.aspx界面
                if (Request.QueryString["id"] == null) { Response.Redirect("Default.aspx"); return; }

                VideoId = Request.QueryString["id"];
                TBUsers user = IdentityManager.ReadUser();
                this.NickName = user.NickName ?? $"用户{user.Id}";
                this.Avatar = user.Avatar ?? "/imgs/avatar.jpg";
            }
        
    }
    }
}